/**
 * 海报
 *
 */
import { Swiper } from "@nutui/nutui-react-taro";
import { View } from "@tarojs/components";
import styles from "./index.module.less";

const list = [
  "https://storage.360buyimg.com/jdc-article/NutUItaro34.jpg",
  "https://storage.360buyimg.com/jdc-article/NutUItaro2.jpg",
  "https://storage.360buyimg.com/jdc-article/welcomenutui.jpg",
  "https://storage.360buyimg.com/jdc-article/fristfabu.jpg",
];
const Banner = () => {
  return (
    <View className="w-full h-[300rpx]">
      <Swiper
        defaultValue={0}
        vertical-center
        indicator
        className={styles["banner"]}
      >
        {list.map((item, index) => {
          return (
            <Swiper.Item key={item}>
              <img
                width="100%"
                height="100%"
                src={item}
                onClick={() => console.log(index)}
                alt=""
              />
            </Swiper.Item>
          );
        })}
      </Swiper>
    </View>
  );
};
export default Banner;
